﻿<?php echo $html->link(__('login_logout', true),array('controller' => 'users', 'action' => 'logout')); ?> 
<br/><br/> 
Bonjour <?php e($user['firstname']. ' ' .$user['lastname']); ?><br/>
<?php __('login_success'); ?>
<br /><br /><fieldset>
<legend>Liste des projets accessibles</legend>
<?php 
	foreach ($roles as $key) {
		e(' ' . $html->link($key['Project']['name'], '/'. $key['Project']['rewrite_name'] .'/'.$key['Project']['id'] .'/projects/') .' ');
	}
?>
</fieldset>
<br />
<?php
	if ($user['rank'] == 1)
	{
		echo '<fieldset><legend>Administration</legend>';
		echo $html->link(__('elt_valid', true), '/admin/'); echo ' | ';
		echo $html->link(__('list_client', true), '/companies'); echo ' | ';
		echo $html->link(__('list_contract', true), '/contracts'); echo ' | ';
		echo $html->link(__('list_project', true), '/projects/liste'); echo ' | ';
		echo $html->link(__('list_user', true), '/users/liste'); echo ' | ';
		echo $html->link(__('list_receip', true), '/receiptbooks/liste'); echo ' | ';
		echo $html->link(__('list_profil', true), '/profils/liste'); echo ' | ';
		echo $html->link(__('list_interv', true), '/interventions/liste');
		echo '</fieldset>';
	}
	echo '<br />';
	if ($user['rank'] == 1 || $user['rank'] == 3 || $user['rank'] == 4)
	{
		echo '<fieldset><legend>Gestion de WebX 2.0</legend>';
		echo $html->link('Nouveau Projet', '/projects/add'); echo ' | ';
		echo $html->link('Nouveau Client', '/companies/add'); echo ' | ';
		echo $html->link('Nouveau Contrat', '/contracts/add'); echo ' | ';
		echo $html->link('Nouvel Utilisateur', '/users/add'); echo ' | ';
		echo $html->link('Nouveau Carnet', '/receiptbooks/add');
		echo '</fieldset>';
	}	
?>